package net.oktaeder.office.model;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.util.ArrayList;
import java.util.Iterator;

public class Employee {

	private static Log log = LogFactory.getLog(Employee.class);
	private String name;
	private String PIN;
	private int salary;
	
	private ArrayList<WorkOrder> orders;
	
	public Employee() {
		log.trace("Creating an instance");
		orders = new ArrayList<WorkOrder>();
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPIN() {
		return PIN;
	}
	public void setPIN(String pin) {
		PIN = pin;
	}
	public int getSalary() {
		return salary;
	}
	public void setSalary(int salary) {
		this.salary = salary;
	}
	
	public void addOrder(WorkOrder order) {
		orders.add(order);
	}
	
	public Iterator<WorkOrder> getOrderIterator() {
		return orders.iterator();
	}
}